import 'dart:async';

import 'package:flutter/services.dart';

class MitScore {
  static const MethodChannel _channel = const MethodChannel('mit_score');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  static void launch(
      {required String androidAppId,
      required String iOSAppId,
      bool writeReview = true}) async {
    await _channel.invokeMethod('onScore', {
      'android_id': androidAppId,
      'ios_id': iOSAppId,
      'write_review': writeReview
    });
  }
}
